package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);


    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    UserInfo selectUsernameAndpassword(
            @Param("username") String username, @Param("password") String password);


    int selectUserByPhone(String phone);

    void updatePasswordByPhone(@Param("phone") String phone, @Param("password") String password);

    void updateEmailById(@Param("email") String email, @Param("id") Long id);

    void updateIntegralById(@Param("integral") Integer integral, @Param("id") Long id);

    void updatePhoneByid(@Param("phone") String phone, @Param("id") Long id);

    List<UserInfo> selectByKeyword(String keyword);
}